package com.xja.seckill.pay.controller;

import com.xja.seckill.order.commons.JsonBean;
import com.xja.seckill.pay.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PayController {

    @Autowired
    private PayService payService;

    @RequestMapping("pay")
    public JsonBean pay(String code){
        return new JsonBean (0,"支付成功",payService.payOrder (code));
    }

}
